<!DOCTYPE html>
<html>
<head>

    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">


    <title>修改订单</title>
	<meta http-equiv="X-UA-Compatible" content="IE=edge"/>
	<meta name="viewport" content="initial-scale=1.0,user-scalable=no,width=device-width,height=device-height" />
	
	<!-- 通用文件引入 -->
	<#include "../../common/base.html"/>    
	<script type="text/javascript" charset="utf-8" src="${webRoot!}/js/bus/order/order.js"></script>
	<script type="text/javascript">
		$(function(){
		    Order.path = '${webRoot!}';
		});
	</script>

</head>

<body class="gray-bg">
    <div class="col-sm-12" id="update-shop-dialog">
         <div class="ibox float-e-margins">
             <div class="ibox-title">
                 <h5>修改订单</h5>
             </div>
             <div class="ibox-content">
                 <form method="get" class="form-horizontal">
                     <div class="form-group">
                         <label class="col-sm-2 control-label"><font class="tip-red">*</font>商品名称（PC端显示）</label>
                         <div class="col-sm-4">
                         	 <input type="hidden" id="sId" value="${item.sId!}">	
                             <input type="text" class="form-control" id="sName" maxlength="100" placeholder="商品的名称，用户PC端展示" value="${item.sName!}">
                             <span id="sNameSpan" class="tip-red"></span>
                         </div>
                         <label class="col-sm-2 control-label"><font class="tip-red">*</font>商品名称（移动端显示）</label>
                         <div class="col-sm-4">
                             <input type="text" class="form-control" id="sMobileName" maxlength="50" placeholder="商品的名称，用户移动端展示" value="${item.sMobileName!}">
                             <span id="sMobileNameSpan" class="tip-red"></span>
                         </div>
                     </div>
                     <div class="hr-line-dashed"></div>
                     <div class="form-group">
                         <label class="col-sm-2 control-label"><font class="tip-red">*</font>商品编号</label>
                         <div class="col-sm-4">
                             <input type="text" class="form-control" id="sNo" maxlength="30" placeholder="商品的唯一编号，不能重复" onblur="Shop.checkShopNo(this.value)" value="${item.sNo!}">
                             <span id="sNoSpan" class="tip-red"></span>
                         </div>
                         <label class="col-sm-2 control-label"><font class="tip-red">*</font>商品类别</label>
                         <div class="col-sm-4">
                             <input type="text" class="form-control" id="shopType" placeholder="商品类别" onclick="Shop.showShopTypeTree()" ids="${item.shopType.stId!}" value="${item.shopType.stName!}"/>
                             <div id="shopTypeContent" class="menuContent" style="display:none; position: absolute ;z-index:100001;background-color: white;overflow:auto; border:1px solid #D3D3D3;width: 250px">
								<ul id="shop-type-tree" class="ztree" style="margin-top:0;height: 400px;"></ul>
							</div>
                             <span id="stNameSpan" class="tip-red"></span>
                         </div>
                     </div>
                     <div class="hr-line-dashed"></div>
                     <div class="form-group">
                         <label class="col-sm-2 control-label">商品关键字</label>
                         <div class="col-sm-10">
                             <input type="text" class="form-control" id="sShopKeyWord" maxlength="200" placeholder="商品检索关键字，多个关键字请使用,分割" value="${item.sShopKeyWord!}">
                         </div>
                     </div>
                     <div class="hr-line-dashed"></div>
                     <div class="form-group">
                         <label class="col-sm-2 control-label">商品标签</label>
                         <div class="col-sm-10" id="shopLabelDiv">
                         	
                         	<#list shopLabels as label>
                         	 <label class="checkbox-inline">
                                 <input type="checkbox" value="${label.slId!}" id="${label.slId!}">${label.slName!}
                             </label>
                             </#list>
                         </div>
                     </div>
                     <div class="hr-line-dashed"></div>
                     <div class="form-group">
                         <label class="col-sm-2 control-label"><font class="tip-red">*</font>商品库存</label>
                         <div class="col-sm-4">
                             <input type="text" class="form-control" id="sShopInventoryNum" maxlength="10" placeholder="商品的库存数量" value="${item.sShopInventoryNum!}">
                             <span id="sShopInventoryNumSpan" class="tip-red"></span>
                         </div>
                         <label class="col-sm-2 control-label">商品销售量</label>
                         <div class="col-sm-4">
                             <input type="text" class="form-control" id="aShopSellNum" maxlength="10" placeholder="商品已经销售的数量" value="${item.aShopSellNum!}">
                             <span id="aShopSellNumSpan" class="tip-red"></span>
                         </div>
                     </div>
                     <div class="hr-line-dashed"></div>
                     <div class="form-group">
                         <label class="col-sm-2 control-label"><font class="tip-red">*</font>商品上/下架</label>
                         <div class="col-sm-4">
                             <label class="checkbox-inline">
                             	 <#if item.sIsPutaway==1>
                                 	<input type="radio" value="1" id="sIsPutaway" checked="checked">上架
                                 <#else>
                                 	<input type="radio" value="1" id="sIsPutaway">上架
                                 </#if>
                             </label>
                             <label class="checkbox-inline">
                             	 <#if item.sIsPutaway==0>
                                 	<input type="radio" value="0" id="sIsPutaway" checked="checked">下架
                                 <#else>
                                 	<input type="radio" value="0" id="sIsPutaway">下架
                                 </#if>
                                 
                             </label>
                         </div>
                         <label class="col-sm-2 control-label">商品序号</label>
                         <div class="col-sm-4">
                             <input type="text" class="form-control" id="sSort" maxlength="5" placeholder="商品用于排序的序号，序号越大商品排序越靠前" value="${item.sSort!}">
                             <span id="sSortSpan" class="tip-red"></span>
                         </div>
                     </div>
                     <div class="hr-line-dashed"></div>
                     <div class="form-group">
                         <label class="col-sm-2 control-label"><font class="tip-red">*</font>商品价格</label>
                         <div class="col-sm-10">
                         	<table class="shop-price-table" border="1" bordercolor="#E5E6E7">
                         		<tr>
                         			<td style="width: 10%;">商品单位</td>
                         			<td style="width: 15%;">规格</td>
                         			<td style="width: 15%;">市场价/元</td>
                         			<td style="width: 15%;">成本价/元</td>
                         			<td style="width: 15%;">本店价/元</td>
                         			<td style="width: 15%;">转换数量/斤</td>
                         			<td style="width: 25%;">会员等级</td>
                         		</tr>
                         		<tr>
                         			<td rowspan="4">
	                         			<input type="text" class="form-control" id="spUnit" placeholder="商品单位" maxlength="50" value="${item.shopPrice.spUnit}" />
	                         			<span id="spUnitSpan" class="tip-red"></span>
                         			</td>
	                         		<td rowspan="4">
	                         			<input type="text" class="form-control" id="spSpecification" placeholder="商品规格" maxlength="100" value="${item.shopPrice.spSpecification}" />
	                         			<span id="spSpecificationSpan" class="tip-red"></span>
	                         		</td>
	                         		<td rowspan="4">
	                         			<input type="text" class="form-control" id="spMarketPrice" placeholder="商品市场价" maxlength="5" value="${item.shopPrice.spMarketPrice}" />
	                         			<span id="spMarketPriceSpan" class="tip-red"></span>
	                         		</td>
	                         		<td rowspan="4">
	                         			<input type="text" class="form-control" id="spCostPrice" placeholder="商品成本价" maxlength="5" value="${item.shopPrice.spCostPrice}"/>
	                         			<span id="spCostPriceSpan" class="tip-red"></span>
	                         		</td>
	                         		<td rowspan="4">
	                         			<input type="text" class="form-control" id="spPrice" placeholder="商品单价" maxlength="5" value="${item.shopPrice.spPrice}"/>
	                         			<span id="spPriceSpan" class="tip-red"></span>
	                         		</td>
	                         		<td rowspan="4">
	                         			<input type="text" class="form-control" id="spUnitNum" placeholder="数量转换" maxlength="10" value="${item.shopPrice.spUnitNum}"/>
	                         			<span id="spUnitNumSpan" class="tip-red"></span>
	                         		</td>
	                         		<td>
	                         			<div class="shop-member-title">钻石会员</div>
	                         			<div class="shop-member-price">
	                         				<input type="text" class="form-control" id="spLevelDiamondPrice" placeholder="钻石会员价格" maxlength="5" value="${item.shopPrice.spLevelDiamondPrice}" />
	                         				<span id="spLevelDiamondPriceSpan" class="tip-red"></span>
	                         			</div>
	                         		</td>
	                         	</tr>	
	                         	<tr>
	                         		<td>
	                         			<div class="shop-member-title">金牌会员</div>
	                         			<div class="shop-member-price">
	                         				<input type="text" class="form-control" id="spLevelGoldPrice" placeholder="金牌会员价格" maxlength="5" value="${item.shopPrice.spLevelGoldPrice}" />
	                         				<span id="spLevelGoldPriceSpan" class="tip-red"></span>
	                         			</div>
	                         		</td>
	                         	</tr>
	                         	<tr>
	                         		<td>
	                         			<div class="shop-member-title">银牌会员</div>
	                         			<div class="shop-member-price">
	                         				<input type="text" class="form-control" id="spLevelSilverPrice" placeholder="银牌会员价格" maxlength="5" value="${item.shopPrice.spLevelSilverPrice}"/>
	                         				<span id="spLevelSilverPriceSpan" class="tip-red"></span>
	                         			</div>
	                         		</td>
	                         	</tr>
	                         	<tr>
	                         		<td>
	                         			<div class="shop-member-title">铜牌会员</div>
	                         			<div class="shop-member-price">
	                         				<input type="text" class="form-control" id="spLevelCopperPrice" placeholder="铜牌会员价格" maxlength="5" value="${item.shopPrice.spLevelCopperPrice}" />
	                         				<span id="spLevelCopperPriceSpan" class="tip-red"></span>
	                         			</div>
	                         		</td>
	                         	</tr>
                         	</table>	
                         </div>
                     </div>
                     <div class="hr-line-dashed"></div>
                     <div class="form-group">
                         <label class="col-sm-2 control-label"><font class="tip-red">*</font>商品缩略图</label>
                         <div class="col-sm-10">
                             <input type="file" class="form-control" id="sImgSmall" name="sImgSmall" placeholder="商品缩略图">
                             <span id="sImgSmallSpan" class="tip-red"></span>
                         </div>
                     </div>
                     <#if item.sImgSmall??>
                     <div class="form-group">
                         <label class="col-sm-2 control-label"></label>
                         <div class="col-sm-10">
                             <img src="${webRoot!}/upload/${item.sImgSmall!}" class="update-shop-small-img"/>
                         </div>
                     </div>
                     </#if>
                     <div class="hr-line-dashed"></div>
                     <div class="form-group">
                         <label class="col-sm-2 control-label"><font class="tip-red">*</font>商品大图1</label>
                         <div class="col-sm-10">
                             <input type="file" class="form-control" id="sImgBig1" name="sImgBig1" placeholder="商品展示的大图">
                             <span id="sImgBig1Span" class="tip-red"></span>
                         </div>
                     </div>
                     <#if item.sImgBig1??>
                     <div class="form-group">
                         <label class="col-sm-2 control-label"></label>
                         <div class="col-sm-10">
                             <img src="${webRoot!}/upload/${item.sImgBig1!}" class="update-shop-small-img"/>
                         </div>
                     </div>
                     </#if>
                     <div class="hr-line-dashed"></div>
                     <div class="form-group">
                         <label class="col-sm-2 control-label">商品大图2</label>
                         <div class="col-sm-10">
                             <input type="file" class="form-control" id="sImgBig2" name="sImgBig2" placeholder="商品展示的大图">
                             <span id="sImgBig2Span" class="tip-red"></span>
                         </div>
                     </div>
                     <#if item.sImgBig2??>
                     <div class="form-group">
                         <label class="col-sm-2 control-label"></label>
                         <div class="col-sm-10">
                             <img src="${webRoot!}/upload/${item.sImgBig2!}" class="update-shop-small-img"/>
                         </div>
                     </div>
                     </#if>
                     <div class="hr-line-dashed"></div>
                     <div class="form-group">
                         <label class="col-sm-2 control-label">商品大图3</label>
                         <div class="col-sm-10">
                             <input type="file" class="form-control" id="sImgBig3" name="sImgBig3" placeholder="商品展示的大图">
                             <span id="sImgBig3Span" class="tip-red"></span>
                         </div>
                     </div>
                     <#if item.sImgBig3??>
                     <div class="form-group">
                         <label class="col-sm-2 control-label"></label>
                         <div class="col-sm-10">
                             <img src="${webRoot!}/upload/${item.sImgBig3!}" class="update-shop-small-img"/>
                         </div>
                     </div>
                     </#if>
                     <div class="hr-line-dashed"></div>
                     <div class="form-group">
                         <label class="col-sm-2 control-label">商品大图4</label>
                         <div class="col-sm-10">
                             <input type="file" class="form-control" id="sImgBig4" name="sImgBig4" placeholder="商品展示的大图">
                             <span id="sImgBig4Span" class="tip-red"></span>
                         </div>
                     </div>
                     <#if item.sImgBig4??>
                     <div class="form-group">
                         <label class="col-sm-2 control-label"></label>
                         <div class="col-sm-10">
                             <img src="${webRoot!}/upload/${item.sImgBig4!}" class="update-shop-small-img"/>
                         </div>
                     </div>
                     </#if>
                     <div class="hr-line-dashed"></div>
                     <div class="form-group">
                         <label class="col-sm-2 control-label">商品大图5</label>
                         <div class="col-sm-10">
                             <input type="file" class="form-control" id="sImgBig5" name="sImgBig5" placeholder="商品展示的大图">
                             <span id="sImgBig5Span" class="tip-red"></span>
                         </div>
                     </div>
                     <#if item.sImgBig5??>
                     <div class="form-group">
                         <label class="col-sm-2 control-label"></label>
                         <div class="col-sm-10">
                             <img src="${webRoot!}/upload/${item.sImgBig5!}" class="update-shop-small-img"/>
                         </div>
                     </div>
                     </#if>
                     <div class="hr-line-dashed"></div>
                     <div class="form-group">
                         <label class="col-sm-2 control-label"><font class="tip-red">*</font>商品描述</label>
                         <div class="col-sm-10">
                             <textarea name="content" id="sDesc" style="width:100%;height:480px;" placeholder="商品描述">${item.sDesc!}</textarea>
                             <span id="sDescSpan" class="tip-red"></span>
                         </div>
                     </div>
                     
                     <div class="hr-line-dashed"></div>
                     <div class="form-group">
                         <div class="col-sm-12 text-center">
                             <button class="btn btn-primary" type="button" onclick="Shop.updateShop()">保存商品</button>&nbsp;
                             <button class="btn btn-white" type="button" onclick="window.history.back()">返回商品列表</button>
                         </div>
                     </div>
                 </form>
             </div>
         </div>
     </div>
</body>
